import { orderApi } from "@/utils/api";

interface IndexstateType{
    orderList:string[];
}
export const orderModule={
    namespaced:true,
    state:{
        orderList:[],
    },
    mutations:{
        getorderList(state:IndexstateType,payload:any){
            state.orderList = payload.res;
        },
    },
    actions:{
      async  getorderAsync({commit}:any){
            const res = await orderApi();
            commit('getorderList',res.result);
        }
    }
}